import {Http} from '@/utils'

export function _getUserInfo() {
  return Http({
    url: '/userInfo/my',
    method: 'get'
  })
}

export function _getUserInfoYours(id) {
  return Http({
    url: '/userInfo/user/' + id,
    method: 'get'
  })
}

export function _getCommentMy(data) {
  return Http({
    url: '/comment/my',
    method: 'get',
    params: {
      ...data
    }
  })
}

export function _getCommentYours(id, data) {
  return Http({
    url: '/comment/user/' + id,
    method: 'get',
    params: {
      ...data
    }
  })
}

export function _isFollow(id) {
  return Http({
    url: '/userRelation/isFollow',
    method: 'get',
    params: {
      followId: id
    }
  })
}

export function _postFollow(id) {
  return Http({
    url: '/userRelation',
    method: 'post',
    body: {
      followId: id
    }
  })
}

export function _delFollow(id) {
  return Http({
    url: '/userRelation/userRelation',
    method: 'delete',
    body: {
      followId: id
    }
  })
}

export function _delComment(id) {
  return Http({
    url: '/comment/' + id,
    method: 'delete'
  })
}
